<?php defined ( 'SYSPATH' ) or die ( 'No direct script access.' );
/**
 * Share block class
 * 
 * @author cks
 */
class Block_User {

	public static function post_list($user_info,$post_list) {

		if(Lib_Base::is_mobile()){

			$view = View::factory ('mobile/user/block/post_list');
		}
		else{

			$view = View::factory ('user/block/post_list');
		}

		
		$view->post_list = $post_list;

		$view->user_info = $user_info;

		$cuser=Session::instance()->get('user');

		$view->cuser=$cuser;
		
		return $view->render();
	}


	public static function praise_list($user_info,$post_list) {

		if(Lib_Base::is_mobile()){

			$view = View::factory ('mobile/user/block/praise_list');
		}
		else{

			$view = View::factory ('user/block/praise_list');
		}

		
		$view->post_list = $post_list;

		$view->user_info = $user_info;

		$cuser=Session::instance()->get('user');

		$view->cuser=$cuser;
		
		return $view->render();
	}

	public static function review_list($user_info,$post_list) {

		if(Lib_Base::is_mobile()){

			$view = View::factory ('mobile/user/block/review_list');
		}
		else{

			$view = View::factory ('user/block/review_list');
		}

		
		$view->post_list = $post_list;

		$view->user_info = $user_info;

		$cuser=Session::instance()->get('user');

		$view->cuser=$cuser;
		
		return $view->render();
	}

	public static function album_list($album_list) {
	
		$view = View::factory ('user/block/album_list');
		
		$view->album_list = $album_list;
		
		return $view->render();
	}

	public static function wish_list($user_info,$wish_list) {

		if(Lib_Base::is_mobile()){

			$view = View::factory ('mobile/user/block/wish_list');
		}
		else{

			$view = View::factory ('user/block/wish_list');
		}
		
		$view->wish_list = $wish_list;

		$view->user_info = $user_info;

		$cuser=Session::instance()->get('user');

		$view->cuser=$cuser;
		
		return $view->render();
	}

	public static function follow_list($follow_list) {
	
		$view = View::factory ('user/block/follow_list');
		
		$view->follow_list = $follow_list;
		
		return $view->render();
	}

	public static function fans_list($fans_list) {
	
		$view = View::factory ('user/block/fans_list');
		
		$view->fans_list = $fans_list;
		
		return $view->render();
	}

	public static function wish_items($user_info){
		
		$wish_model=new Model_Wish();

        $listInfo=$wish_model->getInfoByUser($user_info['userid'],$offset,$pageSize);
	}
	
}